function ex_PathPlanning
StartPos=[0,0];
GoalPos=[1,1];
rect=p_rect(0.5,0.5)+0.5;
bnd=newboundary(rect);
obs={};
for k=1:30,
    ob=newobstacle([],'size',0.05,'pos',rand(1,2));
    if is_in_obstacle(StartPos,ob)<1 &  is_in_obstacle(GoalPos,ob)<1,
        obs={obs{:},ob};
    end;
end;
%~ for k=21:30,
    %~ obs{k}=newobstacle([],'shape','wall','size',0.10,'pos',rand(1,2));
%~ end;

P1=newplayer(...
'image','images/robot.jpg',...
'pos',[0 0],...
'ang',0,...
'speed',1,...
'step_func','PP_step_player',...
'draw_player_func','PP_draw_player',...
'GoalPos',[1,1],...
'SensorRange',0.02...
);
G=newgame({P1},'h',0.01,'axis',[0 1 0 1],'boundary',bnd,'obstacles',{obs},'pause','pause(G.h)','moviefile','ex_pp2.avi')
G=simgame(G)
